package com.second.app.thread.volatiled;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author GYZ
 * <pre>
 *
 * </pre>
 */
public class AtomicDemo {

    public static volatile int count;

    public static void main(String[] args) {


        for (int i = 0; i < 100; i++) {
            new Thread(() -> {
                for (int j = 0; j < 100; j++) {
                    count++;
                }
            }).start();
            System.out.println(count);
        }
    }
}
